<template>
  <div class="user-wrapper">
    <div class="user-title">
      <van-button
        class="btn-back"
        icon="arrow-left"
        :to="{ name: 'user-msg' }" />
      {{ $t('User.msg') }}
    </div>
    <van-loading class="full-loading" v-if="!detail" type="spinner" />
    <div class="msg-detail" v-else v-html="detail"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      detail: '',
    };
  },
  created() {
    this.getMsg();
  },
  methods: {
    async getMsg() {
      const { code, data } = await this.$http();

      if (code === 0) {
        this.detail = data;
      }
      this.loading = false;
    }
  }
};
</script>

<style lang="less" scoped>
  .msg-detail{
    padding: 40px;
    background: #fff;
    line-height:48px;
  }
</style>
